home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / elk-2_0.lha / elk-2.0 / examples / xaw / stripchart < prev    next >
Encoding:
Text File  |  1991-09-26  |  448 b   |  22 lines

  1. ;;; -*-Scheme-*-
  2. ;;;
  3. ;;; Stripchart widget demo
  4.  
  5. (require 'xwidgets)
  6. (load-widgets shell stripchart)
  7.  
  8. (define top (application-initialize 'stripchart))
  9.  
  10. (define s (create-managed-widget (find-class 'stripchart) top))
  11. (set-values! s 'update 1 'jump-scroll 2)
  12.  
  13. (define id
  14.   (stripchart-set-sampler s
  15.     (let ((x -.1))
  16.       (lambda ()
  17.         (set! x (+ x .1))
  18.         (1+ (sin x))))))
  19.  
  20. (realize-widget top)
  21. (context-main-loop (widget-context top))
  22.